home *** CD-ROM | disk | FTP | other *** search
-
-
-
- JJJJPPPPEEEEGGGGTTTTRRRRAAAANNNN((((1111)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((3333 AAAAuuuugggguuuusssstttt 1111999999997777)))) JJJJPPPPEEEEGGGGTTTTRRRRAAAANNNN((((1111))))
-
-
-
- NNNNAAAAMMMMEEEE
- jpegtran - lossless transformation of JPEG files
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- jjjjppppeeeeggggttttrrrraaaannnn [ _o_p_t_i_o_n_s ] [ _f_i_l_e_n_a_m_e ]
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- jjjjppppeeeeggggttttrrrraaaannnn performs various useful transformations of JPEG
- files. It can translate the coded representation from one
- variant of JPEG to another, for example from baseline JPEG
- to progressive JPEG or vice versa. It can also perform some
- rearrangements of the image data, for example turning an
- image from landscape to portrait format by rotation.
-
- jjjjppppeeeeggggttttrrrraaaannnn works by rearranging the compressed data (DCT
- coefficients), without ever fully decoding the image.
- Therefore, its transformations are lossless: there is no
- image degradation at all, which would not be true if you
- used ddddjjjjppppeeeegggg followed by ccccjjjjppppeeeegggg to accomplish the same
- conversion. But by the same token, jjjjppppeeeeggggttttrrrraaaannnn cannot perform
- lossy operations such as changing the image quality.
-
- jjjjppppeeeeggggttttrrrraaaannnn reads the named JPEG/JFIF file, or the standard
- input if no file is named, and produces a JPEG/JFIF file on
- the standard output.
-
- OOOOPPPPTTTTIIIIOOOONNNNSSSS
- All switch names may be abbreviated; for example, ----ooooppppttttiiiimmmmiiiizzzzeeee
- may be written ----oooopppptttt or ----oooo. Upper and lower case are
- equivalent. British spellings are also accepted (e.g.,
- ----ooooppppttttiiiimmmmiiiisssseeee), though for brevity these are not mentioned
- below.
-
- To specify the coded JPEG representation used in the output
- file, jjjjppppeeeeggggttttrrrraaaannnn accepts a subset of the switches recognized
- by ccccjjjjppppeeeegggg:
-
- ----ooooppppttttiiiimmmmiiiizzzzeeee
- Perform optimization of entropy encoding parameters.
-
- ----pppprrrrooooggggrrrreeeessssssssiiiivvvveeee
- Create progressive JPEG file.
-
- ----rrrreeeessssttttaaaarrrrtttt _N
- Emit a JPEG restart marker every N MCU rows, or every N
- MCU blocks if "B" is attached to the number.
-
- ----ssssccccaaaannnnssss _f_i_l_e
- Use the scan script given in the specified text file.
-
- See ccccjjjjppppeeeegggg(1) for more details about these switches. If you
- specify none of these switches, you get a plain baseline-
-
-
-
- Page 1 (printed 12/16/98)
-
-
-
-
-
-
- JJJJPPPPEEEEGGGGTTTTRRRRAAAANNNN((((1111)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((3333 AAAAuuuugggguuuusssstttt 1111999999997777)))) JJJJPPPPEEEEGGGGTTTTRRRRAAAANNNN((((1111))))
-
-
-
- JPEG output file. The quality setting and so forth are
- determined by the input file.
-
- The image can be losslessly transformed by giving one of
- these switches:
-
- ----fffflllliiiipppp hhhhoooorrrriiiizzzzoooonnnnttttaaaallll
- Mirror image horizontally (left-right).
-
- ----fffflllliiiipppp vvvveeeerrrrttttiiiiccccaaaallll
- Mirror image vertically (top-bottom).
-
- ----rrrroooottttaaaatttteeee 99990000
- Rotate image 90 degrees clockwise.
-
- ----rrrroooottttaaaatttteeee 111188880000
- Rotate image 180 degrees.
-
- ----rrrroooottttaaaatttteeee 222277770000
- Rotate image 270 degrees clockwise (or 90 ccw).
-
- ----ttttrrrraaaannnnssssppppoooosssseeee
- Transpose image (across UL-to-LR axis).
-
- ----ttttrrrraaaannnnssssvvvveeeerrrrsssseeee
- Transverse transpose (across UR-to-LL axis).
-
- The transpose transformation has no restrictions regarding
- image dimensions. The other transformations operate rather
- oddly if the image dimensions are not a multiple of the iMCU
- size (usually 8 or 16 pixels), because they can only
- transform complete blocks of DCT coefficient data in the
- desired way.
-
- jjjjppppeeeeggggttttrrrraaaannnn's default behavior when transforming an odd-size
- image is designed to preserve exact reversibility and
- mathematical consistency of the transformation set. As
- stated, transpose is able to flip the entire image area.
- Horizontal mirroring leaves any partial iMCU column at the
- right edge untouched, but is able to flip all rows of the
- image. Similarly, vertical mirroring leaves any partial
- iMCU row at the bottom edge untouched, but is able to flip
- all columns. The other transforms can be built up as
- sequences of transpose and flip operations; for consistency,
- their actions on edge pixels are defined to be the same as
- the end result of the corresponding transpose-and-flip
- sequence.
-
- For practical use, you may prefer to discard any
- untransformable edge pixels rather than having a strange-
- looking strip along the right and/or bottom edges of a
- transformed image. To do this, add the ----ttttrrrriiiimmmm switch:
-
-
-
- Page 2 (printed 12/16/98)
-
-
-
-
-
-
- JJJJPPPPEEEEGGGGTTTTRRRRAAAANNNN((((1111)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((3333 AAAAuuuugggguuuusssstttt 1111999999997777)))) JJJJPPPPEEEEGGGGTTTTRRRRAAAANNNN((((1111))))
-
-
-
- ----ttttrrrriiiimmmm
- Drop non-transformable edge blocks.
-
- Obviously, a transformation with ----ttttrrrriiiimmmm is not reversible, so
- strictly speaking jjjjppppeeeeggggttttrrrraaaannnn with this switch is not lossless.
- Also, the expected mathematical equivalences between the
- transformations no longer hold. For example, ----rrrrooootttt 222277770000 ----ttttrrrriiiimmmm
- trims only the bottom edge, but ----rrrrooootttt 99990000 ----ttttrrrriiiimmmm followed by
- ----rrrrooootttt 111188880000 ----ttttrrrriiiimmmm trims both edges.
-
- Another not-strictly-lossless transformation switch is:
-
- ----ggggrrrraaaayyyyssssccccaaaalllleeee
- Force grayscale output.
-
- This option discards the chrominance channels if the input
- image is YCbCr (ie, a standard color JPEG), resulting in a
- grayscale JPEG file. The luminance channel is preserved
- exactly, so this is a better method of reducing to grayscale
- than decompression, conversion, and recompression. This
- switch is particularly handy for fixing a monochrome picture
- that was mistakenly encoded as a color JPEG. (In such a
- case, the space savings from getting rid of the near-empty
- chroma channels won't be large; but the decoding time for a
- grayscale JPEG is substantially less than that for a color
- JPEG.)
-
- jjjjppppeeeeggggttttrrrraaaannnn also recognizes these switches that control what to
- do with "extra" markers, such as comment blocks:
-
- ----ccccooooppppyyyy nnnnoooonnnneeee
- Copy no extra markers from source file. This setting
- suppresses all comments and other excess baggage
- present in the source file.
-
- ----ccccooooppppyyyy ccccoooommmmmmmmeeeennnnttttssss
- Copy only comment markers. This setting copies
- comments from the source file, but discards any other
- inessential data.
-
- ----ccccooooppppyyyy aaaallllllll
- Copy all extra markers. This setting preserves
- miscellaneous markers found in the source file, such as
- JFIF thumbnails and Photoshop settings. In some files
- these extra markers can be sizable.
-
- The default behavior is ----ccccooooppppyyyy ccccoooommmmmmmmeeeennnnttttssss. (Note: in IJG
- releases v6 and v6a, jjjjppppeeeeggggttttrrrraaaannnn always did the equivalent of
- ----ccccooooppppyyyy nnnnoooonnnneeee.)
-
- Additional switches recognized by jpegtran are:
-
-
-
-
- Page 3 (printed 12/16/98)
-
-
-
-
-
-
- JJJJPPPPEEEEGGGGTTTTRRRRAAAANNNN((((1111)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((3333 AAAAuuuugggguuuusssstttt 1111999999997777)))) JJJJPPPPEEEEGGGGTTTTRRRRAAAANNNN((((1111))))
-
-
-
- ----mmmmaaaaxxxxmmmmeeeemmmmoooorrrryyyy _N
- Set limit for amount of memory to use in processing
- large images. Value is in thousands of bytes, or
- millions of bytes if "M" is attached to the number.
- For example, ----mmmmaaaaxxxx 4444mmmm selects 4000000 bytes. If more
- space is needed, temporary files will be used.
-
- ----oooouuuuttttffffiiiilllleeee _n_a_m_e
- Send output image to the named file, not to standard
- output.
-
- ----vvvveeeerrrrbbbboooosssseeee
- Enable debug printout. More ----vvvv's give more output.
- Also, version information is printed at startup.
-
- ----ddddeeeebbbbuuuugggg
- Same as ----vvvveeeerrrrbbbboooosssseeee.
-
- EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
- This example converts a baseline JPEG file to progressive
- form:
-
- jjjjppppeeeeggggttttrrrraaaannnn ----pppprrrrooooggggrrrreeeessssssssiiiivvvveeee _f_o_o._j_p_g >>>> _f_o_o_p_r_o_g._j_p_g
-
- This example rotates an image 90 degrees clockwise,
- discarding any unrotatable edge pixels:
-
- jjjjppppeeeeggggttttrrrraaaannnn ----rrrrooootttt 99990000 ----ttttrrrriiiimmmm _f_o_o._j_p_g >>>> _f_o_o_9_0._j_p_g
-
- EEEENNNNVVVVIIIIRRRROOOONNNNMMMMEEEENNNNTTTT
- JJJJPPPPEEEEGGGGMMMMEEEEMMMM
- If this environment variable is set, its value is the
- default memory limit. The value is specified as
- described for the ----mmmmaaaaxxxxmmmmeeeemmmmoooorrrryyyy switch. JJJJPPPPEEEEGGGGMMMMEEEEMMMM overrides
- the default value specified when the program was
- compiled, and itself is overridden by an explicit
- ----mmmmaaaaxxxxmmmmeeeemmmmoooorrrryyyy.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- ccccjjjjppppeeeegggg(1), ddddjjjjppppeeeegggg(1), rrrrddddjjjjppppggggccccoooommmm(1), wwwwrrrrjjjjppppggggccccoooommmm(1)
- Wallace, Gregory K. "The JPEG Still Picture Compression
- Standard", Communications of the ACM, April 1991 (vol. 34,
- no. 4), pp. 30-44.
-
- AAAAUUUUTTTTHHHHOOOORRRR
- Independent JPEG Group
-
- BBBBUUUUGGGGSSSS
- Arithmetic coding is not supported for legal reasons.
-
- The transform options can't transform odd-size images
- perfectly. Use ----ttttrrrriiiimmmm if you don't like the results without
-
-
-
- Page 4 (printed 12/16/98)
-
-
-
-
-
-
- JJJJPPPPEEEEGGGGTTTTRRRRAAAANNNN((((1111)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((3333 AAAAuuuugggguuuusssstttt 1111999999997777)))) JJJJPPPPEEEEGGGGTTTTRRRRAAAANNNN((((1111))))
-
-
-
- it.
-
- The entire image is read into memory and then written out
- again, even in cases where this isn't really necessary.
- Expect swapping on large images, especially when using the
- more complex transform options.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 5 (printed 12/16/98)
-
-
-
-